﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SSPComm.SSPCommands;
using SSPComm.SSPReplies;

namespace SSPComm
{
    public class SSPException:Exception
    {
        public SSPData CommandData
        {
            get;
            private set;
        }

        public SSPException(SSPData inCommandData, String inMessage, Exception inInnerException)
            : base(inMessage, inInnerException)
        {
            CommandData = inCommandData;
        }

        public SSPException(SSPData inCommandData, String inMessage)
            : base(inMessage)
        {
            CommandData = inCommandData;
        }
    }

    public class SSPReplyException:SSPException
    {
        public SSPReply Reply
        {
            get;
            private set;
        }

        public SSPReplyException(SSPData inCommandData, SSPReply inReply, String inMessage)
            : base(inCommandData, inMessage)
        {
            Reply = inReply;
        }
    }

    public class SSPCoinsReplyException : SSPException
    {
        public SSPCoinsReply LastCoinsReply
        {
            get;
            private set;
        }

        public SSPCoinsReplyException(SSPData inCommandData, SSPCoinsReply inCoinsReply, String inMessage, Exception inInnerException)
            : base(inCommandData, inMessage, inInnerException)
        {
            LastCoinsReply = inCoinsReply;
        }
    }
}
